package com.sunlands.deskmate.mapper;

import com.sunlands.deskmate.message.entity.Messages;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Repository;

@Slf4j
@Repository
public class MessageRepository {

    @Autowired
    private MongoTemplate mongoTemplate;

    public void insert(Messages message) {
        mongoTemplate.insert(message);
    }

    public void save(Messages message) {
        mongoTemplate.save(message);
    }

}
